﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class other_Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button_Login_Click(object sender, EventArgs e)
    {
        KUser u = new KUser();
        string LoginName = TextBox_LoginName.Text;
        string PassWord = TextBox_Password.Text;
        if (u.Login(LoginName, PassWord))
        {
            Session["User"] = u;
            if (Session["CallerPage"]!=null)
            {
                Response.Redirect(Session["CallerPage"].ToString());
            }
            else
            {
                Response.Redirect(UTIL.PageDefault);
            }
        }
    }
}